﻿@using _2009035.Utilities;



<script type="text/x-kendo-template" id="template">
   
<div id="tabstrip">
    <ul>
      <li id="salary">Salary</li>
      <li>Title</li>
    </ul>
    <div><div id="salaryDetails"></div></div>
    <div><div id="titleHistory"></div></div>
  </div>
</script>

<script type="text/x-kendo-template" id="titleCreateTemplate">

<div class="k-edit-label"><label for="title">Title</label></div>

<div class="k-edit-field" data-container-for="title">
<select class="k-input k-combobox"  data-bind="value:title" id="select">
@{var atitles = Enum.GetValues(typeof(Titles)).Cast<Titles>();
       
        foreach (var singletitle in atitles)
        {
            if (singletitle != Titles.All)
            {
                <option value=@singletitle.ToString()>@Utility.GetEnumDescription(singletitle) </option>
            } 
      }                    
}
    
</select>
</div>
<div class="k-edit-label"><label for="fromDate">Start Date</label></div>
<div class="k-edit-field" data-container-for="fromDate"><span style="" class="k-widget k-datepicker k-header"><span class="k-picker-wrap k-state-default"><input name="fromDate" data-type="date" data-bind="value:fromDate" data-role="datepicker" style="width: 100%;" class="k-input" type="text" /><span class="k-select" unselectable="on"><span class="k-icon k-i-calendar" unselectable="on">select</span></span></span></span><span class="k-invalid-msg" data-for="fromDate" style="display: none;"></span></div>
    

</script>

<script type="text/kendo-template" id="message">
<div class="k-widget k-tooltip k-tooltip-validation k-invalid-msg field-validation-error" style="margin: 0.5em; display: block; " data-for="#=field#" data-valmsg-for="#=field#" id="#=field#_validationMessage">
<span class="k-icon k-warning"> </span>#=message#<div class="k-callout k-callout-n"></div></div>
</script>

<!-- popup editor template -->
<script id="popupeditor" type="text/x-kendo-template">
<!-- grid element -->
<div id="grid" style="width: 700px; margin: 0 auto;"></div>
<div class="k-edit-label"><label for="salary">Salary</label></div>
<div class="k-edit-field" data-container-for="salary">
    <span style="" class="k-widget k-numerictextbox"><span class="k-numeric-wrap k-state-default"><input class="k-formatted-value k-input" style="display: inline;" readonly="readonly" type="text" /><input name="salary" data-type="number" data-bind="value:salary" data-role="numerictextbox" class="k-input" style="display: none;" type="text" /><span class="k-select"><span class="k-link" unselectable="on"><span title="Increase value" class="k-icon k-i-arrow-n" unselectable="on">Increase value</span></span><span class="k-link" unselectable="on"><span title="Decrease value" class="k-icon k-i-arrow-s" unselectable="on">Decrease value</span></span></span></span></span><span class="k-invalid-msg" data-for="salary" style="display: none;"></span></div>
<div class="k-edit-label"><label for="fromDate">Start Date</label></div>
<div class="k-edit-field" data-container-for="fromDate"><span style="" class="k-widget k-datepicker k-header"><span class="k-picker-wrap k-state-default"><input name="fromDate" data-type="date" data-bind="value:fromDate" data-role="datepicker" style="width: 100%;" class="k-input" type="text" /><span class="k-select" unselectable="on"><span class="k-icon k-i-calendar" unselectable="on">select</span></span></span></span><span class="k-invalid-msg" data-for="fromDate" style="display: none;"></span></div>



</script>
<span class="k-textbox k-space-right" style="width: 300px">
    <input id="txtSearch" type="text" style="width: 270px" />
    <a class="k-icon k-i-search" href="#"></a>
</span>
<br />
<br />
<br />
<div id="dvAccordion" class="accordion">
    <div>
        <h3><a href="#">Advanced Search</a></h3>
        <div>
            @{
                                        // check if the user is the HR Manager, if then render the Kendo UI Table
                                        // commented out user role for the time being   
                                        //if (!User.IsInRole(UserRoles.HRManager.ToString()))
                                        //{
       
                <div class="alert-message">
                    <table>
                        <tr>
                            <td>
                                <label id="lblGender"><strong>Gender   </strong></label>
                            </td>
                            <td>
                                <select id="cmbbxGender">
                                    @{var genders = Enum.GetValues(typeof(Gender)).Cast<Gender>();
                                      foreach (var singleGender in genders)
                                      {
                                        <option value=@singleGender.ToString()>@Utility.GetEnumDescription(singleGender)
                                        </option>
                                      }
                    
                                    }

                                </select>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <label id="lblDepartment"><strong>Department </strong></label>
                            </td>
                            <td>
                                <select id="cmbbxDepartment">
                                    @{var departments = Enum.GetValues(typeof(Departments)).Cast<Departments>();
                                      foreach (var singleDepartment in departments)
                                      {
                                        <option value=@singleDepartment.ToString()>@Utility.GetEnumDescription(singleDepartment)
                                        </option>
                                      }
                    
                                    }

                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label id="lblTitle"><strong>Title </strong></label>
                            </td>
                            <td>
                                <select id="cmbbxTitle">
                                    @{var titles = Enum.GetValues(typeof(Titles)).Cast<Titles>();
                                      foreach (var singletitle in titles)
                                      {
                                        <option value=@singletitle.ToString()>@Utility.GetEnumDescription(singletitle) </option>
                                      }
                    
                                    }

                                </select>
                            </td>

                        </tr>
                    </table>


                </div>
            }
            @* }*@
        </div>
    </div>
</div>
<br />
<br />
@Html.Partial("Additional")